const express = require("express");
const router = new express.Router();
const Student_info = require("../modles/student_info_schema")
const Entry_exam = require("../modles/entry_exam_schema")
const Mid_exam = require("../modles/mid_exam")
const End_exam = require("../modles/end_exam")

router.post("/change_student_info", (req, res) => {
    console.log(req.body)
    res.send(req.body)
    db.Student_info.update({
        stu_id: req.body.stu_id
    }, {
        $set: req.body
    })
})

router.post("/change_entry_exam", (req, res) => {
    console.log(req.body)
    res.send(req.body)
    db.Entry_exam.update({
        stu_id: `${req.body.stu_id}`
    }, {
        $set: req.body
    })
})

router.post("/change_mid_exam", (req, res) => {
    console.log(req.body)
    res.send(req.body)
    db.Mid_exam.update({
        stu_id: `${req.body.stu_id}`
    }, {
        $set: req.body
    })
})

router.post("/change_mid_exam", (req, res) => {
    console.log(req.body)
    res.send(req.body)
    db.End_exam.update({
        stu_id: `${req.body.stu_id}`
    }, {
        $set: req.body
    })
})



module.exports = router;